module.exports = () => {
    return async (ctx,next) => {
        //get ctx.request.query   post ctx.request.body

        if(ctx.request.method === 'GET' || ctx.request.method === 'DELETE'){
            ctx.request.params = {...ctx.request.params,...ctx.request.query}
        }else{
            ctx.request.params = {...ctx.request.params,...ctx.request.body}
        }
        await next()
    }
}